|
|
|
|
|
|
|
(table continued from previous page) |
|
|
|
|
| Control | Property | Setting | | CommandButton | Name | cmdBtn | | Caption | &Add | | Height | 300 | | Index | 0 | | Width | 1200 | | CommandButton | Name | cmdBtn | | Caption | &Update | | Height | 300 | | Index | 1 | | Width | 1200 | | CommandButton | Name | cmdBtn | | Caption | &Delete | | Height | 300 | | Index | 2 | | Width | 1200 | | CommandButton | Name | cmdBtn | | Caption | E&xit | | Height | 300 | | Index | 3 | | Width | 1200 | | DataControl | Name | datFieldTypes | | DatabaseName | FIELDTYPES.MDB (C:\source\chap02\FIELDTYPES.MDB) | | RecordSource | FieldTypes |
|
|
|
|
|
|
2. Now add the code behind the command button array. Double-click the Add button (or any other button in the array) to bring up the code window. Enter the code from Listing 2.1 into the cmdBtn_Click event. |
|
|
|
|
|
|
|
|
Listing 2.1. Code for the cmdBtn_Click event. |
|
|
|
|
|
|
|
|
Private Sub cmdBtn_Click(Index As Integer)
'
' handle button selections |
|
|
|
|
|